package com.zy.stock.service;

import java.util.List;

import com.zy.stock.domain.Pager;
import com.zy.stock.domain.Stock;
import com.zy.stock.domain.StockTranscation;
import com.zy.stock.dto.StockDto;
import com.zy.stock.dto.StockTranscationDto;
import com.zy.stock.dto.UserStockRlProfitDto;

/**
 * 股票交易（包含提醒）
 * @author zhangyi
 *
 */
public interface StockTranscationService {
	
	public Integer save(StockTranscation obj)throws Exception;
	
	/**
	 * 根据条件进行分页查询
	 * @param {@link BillDto}
	 * @param start 起始下标
	 * @param end 结束下标
	 * @return List<Ammeter>
	 * */
	public Pager<List<StockTranscation>> findByCase(Pager<StockTranscationDto> pager) throws Exception;

	public void deleteById(Integer id);

	public void update(StockTranscation stock)throws Exception;

	public StockTranscation findById(Integer id);
	
	public void ignoreById(Integer id);
	
	public void ignoreYesterday();
	
	public double getTotalIncome(Integer userStockRlId);//获取一个仓的总收入
	
	public double getTotalPayCash(Integer userStockRlId);//获取一个仓的总支出
	
	public double getProfit(Integer userStockRlId);//获取盈亏额
	
	public List<UserStockRlProfitDto> findProfit(Integer userId,String year);
	
}
